/*  1:   */ package com.jetbrains.licenseServer.openapi.responses;
/*  2:   */ 
/*  3:   */

import com.jetbrains.licenseServer.openapi.requests.ObtainPermanentTicketRequest;

import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */ 
/*  8:   */ public class ObtainPermanentTicketResponse
/*  9:   */   extends AbstractResponse
/* 10:   */ {
/* 11:   */   private String d;
/* 12:   */   private String e;
/* 13:   */   
/* 14:   */   public ObtainPermanentTicketResponse() {}
/* 15:   */   
/* 16:   */   public ObtainPermanentTicketResponse(String paramString1, ResponseCode paramResponseCode, String paramString2, String paramString3, long paramLong)
/* 17:   */   {
/* 18:20 */     super(paramResponseCode, paramString3, paramLong);
/* 19:21 */     this.d = paramString1;
/* 20:22 */     this.e = paramString2;
/* 21:   */   }
/* 22:   */   
/* 23:   */   public String getTicketId()
/* 24:   */   {
/* 25:26 */     return this.d;
/* 26:   */   }
/* 27:   */   
/* 28:   */   public void setTicketId(String paramString)
/* 29:   */   {
/* 30:30 */     this.d = paramString;
/* 31:   */   }
/* 32:   */   
/* 33:   */   public String getTicketProperties()
/* 34:   */   {
/* 35:34 */     return this.e;
/* 36:   */   }
/* 37:   */   
/* 38:   */   public Map<String, String> parseTicketProperties()
/* 39:   */   {
/* 40:38 */     HashMap localHashMap = new HashMap();
/* 41:39 */     StringTokenizer localStringTokenizer = new StringTokenizer(this.e, "\t", false);
/* 42:40 */     while (localStringTokenizer.hasMoreTokens())
/* 43:   */     {
/* 44:41 */       String str1 = localStringTokenizer.nextToken();
/* 45:42 */       String str2 = str1.substring(0, str1.indexOf("="));
/* 46:43 */       String str3 = str1.substring(str1.indexOf("=") + 1);
/* 47:44 */       localHashMap.put(str2, str3);
/* 48:   */     }
/* 49:46 */     return localHashMap;
/* 50:   */   }
/* 51:   */   
/* 52:   */   public void setTicketProperties(String paramString)
/* 53:   */   {
/* 54:50 */     this.e = paramString;
/* 55:   */   }
/* 56:   */   
/* 57:   */   public String toString()
/* 58:   */   {
/* 59:55 */     return "ObtainTicketResponse[" + getResponseCode() + "," + this.d + ", " + getMessage() + "]";
/* 60:   */   }
/* 61:   */   
/* 62:   */   public static ObtainPermanentTicketResponse error(String paramString, ObtainPermanentTicketRequest paramObtainPermanentTicketRequest)
/* 63:   */   {
/* 64:59 */     ObtainPermanentTicketResponse localObtainPermanentTicketResponse = new ObtainPermanentTicketResponse();
/* 65:60 */     localObtainPermanentTicketResponse.setResponseCode(ResponseCode.ERROR);
/* 66:61 */     localObtainPermanentTicketResponse.setSalt(paramObtainPermanentTicketRequest.getSalt());
/* 67:62 */     localObtainPermanentTicketResponse.setMessage(paramString);
/* 68:63 */     return localObtainPermanentTicketResponse;
/* 69:   */   }
/* 70:   */ }



/* Location:           E:\idea\

 * Qualified Name:     com.jetbrains.licenseServer.openapi.responses.ObtainPermanentTicketResponse

 * JD-Core Version:    0.7.0.1

 */